#include "../header.h"

int main(int argc, char const *argv[])
{
    time_t ts;
    struct tm* tm;

    if((ts=time(NULL)) == (time_t)-1)
      {  
        perror("time error\n");
        return -1;
      } 
      if((tm=localtime(&ts))==NULL)
      {
        perror("localtime error\n");
      }
      printf("%d-%02d-%02d %02d:%02d:%02d\n",
      tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,
      tm->tm_hour,tm->tm_min,tm->tm_sec);
      
    return 0;
}
